package com.strato.base.aop.v1_0_0.inline;

import java.lang.reflect.Method;

import net.sf.cglib.proxy.MethodProxy;

import com.strato.base.aop.v1_0_0.Invocation;

public class CGLibInvocation implements Invocation {

	private Object o;
	private Method method;
	private Object[] args;
	private MethodProxy proxy;

	public CGLibInvocation(Object o, Method method, Object[] args, MethodProxy proxy) {
		this.o=o;
		this.method=method;
		this.args=args;
		this.proxy=proxy;
	}

	@Override
	public Object proceed() throws Throwable {
		return proxy.invokeSuper(o, args);
	}

	@Override
	public Object getObject() {
		return o;
	}

	@Override
	public Method getMethod() {
		return method;
	}

	@Override
	public Object[] getArgs() {
		return args;
	}

}
